{extend name="public/base" /}
{block name="body"}
<a href="{:url('auth/RuleEdit')}" class="btn btn-xs btn-danger ruleadd">
    添加权限
</a>
<div class="row">
    <div class="col-xs-12">
        <div>
                <table width="100%" class="table table-striped table-bordered table-hover" id="dynamic-table">
                    <thead>
                    <tr>
                        <th width="6%">ID</th>
                        <th width="19%">权限名称</th>
                        <th width="22%">控制器/方法</th>
                        <th width="7%">菜单状态</th>
						<td width="7%">是否显示</td>
                        <th width="18%" style="border-right:#CCC solid 1px;">添加时间</th>
                        <th width="11%" style="border-right:#CCC solid 1px;">排序</th>
                        <th width="9%" style="border-right:#CCC solid 1px;">操作</th>
                    </tr>
                    </thead>

                    <tbody>

                    {volist name="list" id="v"}
                        <tr>
                            <td height="28">{$v.id}</td>
                            <td>
                                {$v.title_show}
                            </td>
                            <td>{$v.name}</td>
                            <td>
                                <a class="red _set_status" attr-id="{$v.id}" attr-url="{:url('auth/RuleSetStatus')}" href="javascript:;"  title="已开启">
									{if condition="$v['status'] eq 1"}
                                        <button class="btn btn-minier btn-yellow">启用</button>
                                    {else/}
										<button class="btn btn-minier btn-danger">禁用</button>
									{/if}
                                </a>
                            </td>
							<td>
								<a class="red _set_status" attr-id="{$v.id}" attr-url="{:url('auth/RuleSetShow')}" href="javascript:;"  title="已开启">
									{if condition="$v['is_show'] eq 1"}
										<button class="btn btn-minier btn-yellow">显示</button>
									{else /}
										<button class="btn btn-minier btn-danger">不显示</button>	
									{/if}
                                </a>
							</td>
                            <td>{$v.addtime|date='Y-m-d',###}</td>
                            <td><input name="{$v.id}" value=" {$v.sort}" class="list_order"/></td>
                            <td>
                                <div class="hidden-sm hidden-xs action-buttons">
                                    <a class="green" href="{:url('auth/RuleEdit',array('id'=>$v['id']))}" title="修改">
                                        <i class="ace-icon fa fa-pencil bigger-130"></i> 
									</a>
                                    <a class="red _del" href="javascript:;" attr-id="{$v.id}" attr-url="{:url('auth/RoleDel')}"  title="删除">
                                        <i class="ace-icon fa fa-trash-o bigger-130"></i> 
									</a>
								</div>
                            </td>
                        </tr>
                    {/volist}
                    <tr>
                        <td colspan="8" align="left">
                            <!-- <button type="submit" id="btnorder" class="btn btn-white btn-yellow btn-sm">排序</button> -->
                        </td>
                    </tr>
                    </tbody>
                </table>
        </div>
    </div>
</div>
{/block}